<div id="add_client" class="zoom-anim-dialog add-booking-popup">                       
                      <form method="POST" action="createContract.php" name="createContract" id="createContract">
                        <div class="view-booking-popup">
                        <h1>اضافة حجز / تأجير جديد</h1>
                        <hr />
                        <div class="bookings-edit-container">
                        <span class="text-right small"> رقم العقد / الحجز : #####</span>
                        <h2>الفترة</h2>
                        <div class="bookings-edit-row">
                        <table class="edit-bookings-table add_bookings">
                              <tr>
                                    <td width="70px">&nbsp;نوع الايجار</td>&nbsp;
                                    <td>
                                      <select name="rent_type" style="width:70px; margin-left:10px;" class="rent_type">
                                        <option  value="0">يومى</option>
                                        <option  value="1">إسبوعى</option>
                                        <option value="2">شهرى</option>
                                      </select>                                    
                                    </td>
                                    <td>ميلادي</td>
                                    <td >من  :</td>
                                    <td>
                                      <input type="text" style="width:60px; margin-right:10px" class="small-input check-today" name="from" id="from-miladi" placeholder="" />
                                    </td>
                                    <td style="width:30px;">إلى  :</td>
                                    <td style="width:50px;">
                                      <input type="text" style="width:60px; margin:0 10px" class="small-input" name="to" id="to-miladi" placeholder="" />
                                    </td>
                                    <td width="75px">عدد الأيام:</td>
                                    <td><input type="text" class="xsmall-input period-days" name="period"  id="daily" /></td>
                                    <input type="hidden" value="0" class="requsting-page" name="requsting-page"/> <!-- determine from where the submission came from-->
                                </tr>
                                <tr>
                                    <td>الموافق:</td>
                                    <td></td>
                                    <td>هجري</td>
                                    <td >من:</td>
                                    <td colspan="3">
                                      <div class="show-from-hijri-from"></div>
                                      <input type="hidden" value="" name="hijri-from" id="show-from-hijri-from"/>
                                    </td>
                                    <td>عدد الأشهر:</td>
                                    <td><input type="text" class="xsmall-input period-months" name="" id="monthly" /></td>
                                </tr>
                                
                                <tr>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td >إلى:</td>
                                    <td colspan="3">
                                      <div class="show-from-hijri-to"></div>
                                      <input type="hidden" value="" name="hijri-to" id="show-from-hijri-to"/>
                                    </td>
                                    <td></td>
                                    <td></td>
                                </tr>
                         </table>       
                        </div>
                        <h2>الوحدة\ العميل </h2>
                        <div class="bookings-edit-row apartment-row" disabled="disabled">
                        <table class="edit-bookings-table add_apartment_direct" >
                          <input type="checkbox" name="choose_method" id="choose_method" /> <label class="black small" for="choose_method">نظام الشركات ذات الاسعار الخاصة</label>

                            	<tr>
                                    <td>الوحدة</td>
                                    <input type="hidden" name="apartment_id" id="apartment_id" value="<?php if($thereID == 1){echo $apar_id;} ?>"/>
                                    <!-- Store latest chosen apartment prices -->
                                    <input type="hidden" name="weekly_price" id="weekly_price" value="<?php if($period != -1){echo getpp($apar_id,$period,'weekly');} ?>"/>
                                    <input type="hidden" name="daily_price" id="daily_price" value="<?php if($period != -1){echo getpp($apar_id,$period,'daily');} ?>"/>
                                    <input type="hidden" name="monthly_price" id="monthly_price" value="<?php if($period != -1){echo getpp($apar_id,$period,'monthly');} ?>"/>
                                    <input type="hidden" name="maxd" id="maxd" value="<?php if($period != -1){echo getmd($apar_id,$period);} ?>"/>
                                    
                                    
                                    <td style="width:100px;" id="apartment-found"><?php if($thereID == 1){echo $apar_name;}else{echo "....";} ?></td>
                                    <input type="hidden" id="apartment_names" name="apart_name" value=""/>
                                    <!-- Choose Apartment pop-up triggerer, Ajax request will be sent to href url -->
                                    <td style="width:60px;"><a href="choose-pop-ups/choose_apartment.php" class="ajax-pop-up"><img src="images/edit.png" class="margin-right5" align="" alt="Edit"/></a></td>

                                    
                                    <div class="client-selection">
                                    <td class="client-selection" disabled="disabled">العميل</td>
                                    <td class="client-found client-selection" disabled="disabled">...</td>
                                    <input type="hidden" name="client_id" id="client_id" value=""/>
                                    <td>
                                    	<a href="choose-pop-ups/choose_client.php" disabled="disabled" class="ajax-pop-up client-selection"><img src="images/magnifying.png" class="margin-right5" align="" title="إختار العميل"alt="Edit"/></a>
                                      <a href="createClientAjax.php" id="client_add" class="ajax-pop-up disabled-style-no-bg client_addd" disabled="disabled"><img src="images/plus.png" class="margin-right5" align="" title="إضافة عميل"alt="Edit"/></a>                      
                                    </td>
                                    
                                </tr>
                                <tr>
                                    <td>سعر الوحدة</td>
                                    <td id="apartment-price" ><?php if($period != -1){echo getpp($apar_id,$period,'daily');}else{echo '...';} ?></td>
                                    <td></td>
                                    
                                    <td class="company-selection" disabled="disabled">الشركة</td>
                                    <td class="company-selection company-found" disabled="disabled">...</td>
                                    <input type="hidden" name="company_id" id="company_id" value=""/>
                                    <input type="hidden" name="company_name" id="company_name" value=""/>
                                    <td class="company-selection" disabled="disabled">
                                    </div>
                                    	<div class="company-selection">
                                         
                                        <a href="choose-pop-ups/choose_company.php" class="ajax-pop-up"><img src="images/magnifying.png" class="margin-right5" align="" alt="Edit"/></a>
                                        <a href="#" class="delete-company"><img src="images/x.png" class="margin-right5" align="" alt="Delete" title="حذف الشركة"/></a>
                                      
                                        <!--<a href="#edit_client" class="edit_client_pop"><img src="images/plus.png" class="margin-right5" align="" alt="Edit"/></a>
                                        <a href="#edit_client" class="edit_client_pop"><img src="images/edit.png" class="margin-right5" align="" alt="Edit"/></a>
                                        <a href="#edit_client" class="edit_client_pop"><img src="images/x.png" class="margin-right5" align="" alt="Edit"/></a>-->
                                    </div>
                                    
                                    </td><td><p class="discount"></p></td>
                                </tr>
                                
                               
                         </table>
                         <hr />
                         <table class="edit-bookings-table add_apartment_company" disabled="disabled" >
                            	<tr>
                                    <td class="company-selection-2" disabled="disabled">الشركة</td>
                                    <td class="company-selection-2 company-found-2" disabled="disabled">...</td>
                                    <td class="company-selection-2" disabled="disabled">
                                    </div>
                                    <div class="company-selection">
                                        <!-- f parameter to differentiate between regular companies call and this one-->
                                        <a href="choose-pop-ups/choose_company.php?f=1" class="ajax-pop-up"><img src="images/magnifying.png" class="margin-right5" align="" alt="Edit"/></a>
                                    </div>
                                    <td style="width:110px;"></td>
                                    <div class="client-selection">
                                    <td class="client-selection" disabled="disabled">العميل</td>
                                    <td class="client-found-2 client-selection" disabled="disabled">...</td>
                                    <td>
                                    	<a href="choose-pop-ups/choose_client.php?f=1" disabled="disabled" class="ajax-pop-up client-selection"><img src="images/magnifying.png" class="margin-right5" align="" title="إختار العميل"alt="Edit"/></a>
                                      <a href="createClientAjax.php?f=1" id="client_add" class="ajax-pop-up disabled-style-no-bg client_addd" disabled="disabled"><img src="images/plus.png" class="margin-right5" align="" title="إضافة عميل"alt="Edit"/></a>                      
                                    </td>
                                    
                                    </div>
                                    
                                    
                                </tr>
                                <tr>
                                  <td>الوحدة</td>
                                  <td style="width:100px;" id="apartment-found" class="apartment-names"><?php if($thereID == 1){echo $apar_name;}else{echo "....";} ?></td>
                                  <td></td> <td></td> 
                                  <td>سعر الوحدة</td>
                                    <td id="apartment-price-2"  ><?php if($period != -1){echo getpp($apar_id,$period,'daily');}else{echo '...';} ?></td>
                                </tr>
                               
                         </table>                         
                         <hr />
                         <table class="edit-bookings-table bookings-edit-row discount-control" disabled="disabled">
                            	<tr><td class="black max-discount-text" colspan="3">مبلغ الخصم المتاح: <span class="red"></span> </td></tr>
                              <tr>
                                    <td style="width:90px;">مبلغ الخصم</td>
                                    <td ><input type="text" class="get-discount small-input" name="discount"  value="0"/></td>
                                    <td class="blue"></td>
                                    <td >التكلفة الكلية</td>
                                    <td class="total_price">0</td>
                                </tr>
                                
                                <tr>
                                    <td style="width:90px;">مبلغ الخصم الإضافى</td>
                                    <td ><input type="text" class="get-fixed-discount small-input" name="fixed_discount"  <?php if($_SESSION['r']>1){echo "disabled";} ?> value="0"/></td>
                                    <td></td>
                                    <td >التكلفة النهائية</td>
                                    <td class="final_price">0</td>
                                    <input type="hidden" id="final_price" name="final-price" value="0"/>
                                </tr>
                                
                                <tr>
                                    <td></td>
                                    <td></td>
                                    <td class="blue"></td>
                                    <td>الرصيد</td>
                                    <td class="red credit">0</td>
                                </tr>
                         </table>   
                        <h2>ملاحظات</h2>
                       
                        	<p align="right"><textarea name="notes"></textarea></p>
                       					 
<div class="save-botton disabled-style left" disabled="disabled" style="width:100px">حفظ</div>
<div class="clear"></div>                         
                        </div>
                        <h2>المالية</h2>
                        <div class="bookings-edit-row">
                        <table class="edit-bookings-table" disabled="disabled">
                            	<tr disabled="disabled" class="disabled-div">
                                    <td >المقبوضات</td>
                                    <td >
                                      <select class="small-select recipets" name="recipets" >
                                        <option>..</option>
                                      </select>
                                    </td>
                                    <td >
                                       <!-- create pop-up triggerer, Ajax request will be sent to href url -->
                                      <a href="" class="ajax-pop-ups-magnific-no-modal"><img src="images/plus.png" class="margin-right5" align="" alt="Edit"/></a>
                                    </td>
                                    <td style="width:180px;">المقبوض</td>
                                    <td class="what_paid">0</td>
                                </tr>
                                
                                <tr disabled="disabled" class="disabled-div">
                                    <td>المصروفات</td>
                                    <td>
                                      <select style="width:180px;" class="small-select recipets-1" name="recipets-2" >
                                        <option>..</option>
                                      </select>
                                    </td>
                                    <td>
                                    	<!--<a href="#edit_client<?php //echo $contract['contract_id']; ?>" class="edit_client_pop"><img src="images/print.png" class="margin-right5" align="" alt="Edit"/></a>-->
                                       <!-- create pop-up triggerer, Ajax request will be sent to href url -->
                                      <a href="" class="ajax-pop-ups-magnific-no-modal"><img src="images/plus.png" class="margin-right5" align="" alt="Edit"/></a>
                                        
                                    </td>
                                    <td >بدل الايجار</td>
                                    <td class="paid_back">0</td>
                                </tr>
                                
                                <tr disabled="disabled" class="disabled-div">
                                    <td>الخدمات</td>
                                    <td>
                                     <select  style="width:180px;" class="small-select recipets-1" name="recipets-3" >
                                         <option>..</option>
                                          <input id="total_service_revenue" type="hidden" value="0"/>
                                      </select>
                                    </td>
                                    <td>
                                    	<a href="#edit_client" class="edit_client_pop"><img src="images/print.png" class="margin-right5" align="" alt="Edit"/></a>
                                        <a href="#edit_client" class="edit_client_pop"><img src="images/view.png" class="margin-right5" align="" alt="Edit"/></a>
                                    </td>
                                    <td><!--التأمين --></td>
                                    <td><!--100 --></td>
                                </tr>
                         </table>
                         
                        </div>
                        
                        <input type="hidden" name="what-button" id="what-button" value='1' />
                        
                        <div class="check-in disabled-style left margin-left11" disabled="disabled" style="width:120px">دخول check in</div>
                        <div class="clear"></div>
                        <div class="mfp-close close-button white" >x</div>
                        </div>
                        </form>
                      </div>  
</div>